package main

import (
	"AiSpeaker/api"
	config "AiSpeaker/pkg/conf"
	"AiSpeaker/pkg/logger"
	"github.com/gofiber/fiber/v2"
	"strconv"
)

func main() {
	port := config.GlobalConfig.ServerConfig.Port
	app := fiber.New()
	addr := ":" + strconv.Itoa(port)

	api.AlarmMessageHandler(app)

	err := app.Listen(addr)
	if err != nil {
		logger.Errorf("http服务启动失败")
		return
	}
}
